//
//  UICollectionView+registerView.m
//  OrderSys
//
//  Created by 李李善 on 2017/8/23.
//  Copyright © 2017年 com.hx. All rights reserved.
//

#import "UICollectionView+registerView.h"
#import <objc/runtime.h>

@implementation UICollectionView (registerView)

-(void)registerCellClass:(NSString *)className forIdentifier:(NSString *)Identifier
{
    Class class = NSClassFromString(className);
    [self registerClass:class forCellWithReuseIdentifier:Identifier];
}
-(void)registerHeaderViewClass:(NSString *)className forIdentifier:(NSString *)Identifier
{      Class class = NSClassFromString(className);
    [self registerClass:class forSupplementaryViewOfKind:UICollectionElementKindSectionHeader withReuseIdentifier:Identifier];
}
-(void)registerFooterViewClass:(NSString *)className forIdentifier:(NSString *)Identifier
{    Class class = NSClassFromString(className);
    [self registerClass:class forSupplementaryViewOfKind:UICollectionElementKindSectionFooter withReuseIdentifier:Identifier];
}

@end
